using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QueryGUI
{
	public partial class FrmConfig : Form
	{
		public FrmConfig()
		{
			InitializeComponent();

			txtIndexDir.Text = IndexDir;
			txtWikiDir.Text = WikiDir;
			txtStopWordsDir.Text = StopWordsDir;
		}

		public string IndexDir = @"E:\Wiki\index";
		public string WikiDir = @"E:\Wiki\wikipedia-pl-html\pl";
		public string StopWordsDir = @"E:\Wiki\index\stopwords.dic";

		private void btnBrowseIndex_Click(object sender, EventArgs e)
		{
			if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
			{
				txtIndexDir.Text = folderBrowserDialog1.SelectedPath;
				IndexDir = folderBrowserDialog1.SelectedPath;

			}
		}

		private void btnBrowseWiki_Click(object sender, EventArgs e)
		{
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                txtWikiDir.Text = folderBrowserDialog1.SelectedPath;
                WikiDir = folderBrowserDialog1.SelectedPath;
            }

		}

		private void btnBrowseStopWords_Click(object sender, EventArgs e)
		{
			if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
			{
				txtIndexDir.Text = folderBrowserDialog1.SelectedPath;
				StopWordsDir = folderBrowserDialog1.SelectedPath;

			}
		}

		private void btnAccept_Click(object sender, EventArgs e)
		{
			this.Close();
		}
	}
}